package com.xjtu.chapter05.ex5_3;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/16 17:20
 */
public class ProductTest {
    public static void main(String[] args) {
        Computer apple = new Computer();
        apple.id = 123;
        apple.name = "MacBook";
        apple.categories = "laptop";
        System.out.println(apple.getName());
        System.out.println(apple.getCategories());
        apple.ads();
        apple.addtoShoppingCart();
        apple.orderItem();
        apple.payment();
        apple.shipping();

        Laptop mac = new Laptop();
        mac.name = "MyMac";
        mac.weight = 20;
        mac.thickness=1.2;
        System.out.println(mac.getName());
        System.out.println(mac.getWeight());
        System.out.println(mac.getThickness());
        mac.ads();
        mac.addtoShoppingCart();
        mac.orderItem();
        mac.payment();
        mac.shipping();
    }
}
